package com.study.modules.mini.controller;

import com.study.Util.CommonResponse;
import com.study.annotation.bean.AppContext;
import com.study.modules.mini.service.LoginService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author hupengming
 * @ClassName
 * @Date 2022-11-14 15:26
 * @Version 1.0
 */
@Api(tags = "小程序登录")
@RestController
@RequestMapping("/mini")
public class MiniLoginController {

    @Autowired
    LoginService loginService;

    @PostMapping("/login")
    public CommonResponse<AppContext> login(String code){
        return CommonResponse.success(loginService.login(code));
    }
}
